<script type="text/javascript">
/***
* POSSIBLE  DATA TYPES USED IN JAVASCRIPT
* "undefined" if the variable is of the Undefined type.
*  Equals to null i.e (undefined == null ) returns true
* "boolean" if the variable is of the Boolean type.
* "number" if the variable is of the Number type.
* "string" if the variable is of the String type.
* "object" if the variable is of a reference type or of
the Null type.
*
***/

/**
* Variables in JS are
* 1. loosely typed
* 2. caseSensitive
**/

</script>



<script type="text/javascript">

  alert(typeof testUndefined); // undefined

  var boolCheck = false;
  alert(typeof boolCheck); // boolean

  var age = 123;
  alert(typeof age); // number

  age = '123';
  alert(typeof age); // string

  var testDate = new Date();
  alert(typeof testDate); // object

  // alert(Age); // Eroor Age is not defined because { Age != age }
</script>

<script type="text/javascript">
  /**
  * TO check our variable is defined or not
  **/
  if (typeof someVar === 'undefined') {
    alert('Your variable is undefined');
  }
</script>
